package org.xxpay.core.entity;

import java.io.Serializable;
import java.util.Date;

public class AlipayPayOrder implements Serializable {
    /**
     * 支付订单号
     *
     * @mbggenerated
     */
    private String payOrderId;

    /**
     * 支付宝订单号
     *
     * @mbggenerated
     */
    private String tradeNo;

    /**
     * 付款人支付宝用户ID
     *
     * @mbggenerated
     */
    private String outUserId;

    /**
     * 收款人支付宝用户ID
     *
     * @mbggenerated
     */
    private String inUserId;

    /**
     * 状态,1:待同步,2:已同步,3:生成失败
     *
     * @mbggenerated
     */
    private Byte status;

    /**
     * APP心跳时间
     *
     * @mbggenerated
     */
    private Date appHeartTime;

    /**
     * 支付宝订单同步时间
     *
     * @mbggenerated
     */
    private Date syncTime;

    /**
     * 创建时间
     *
     * @mbggenerated
     */
    private Date createTime;

    /**
     * 更新时间
     *
     * @mbggenerated
     */
    private Date updateTime;

    /**
     * 支付宝账号
     *
     * @mbggenerated
     */
    private String alipayAccount;

    /**
     * 订单金额
     *
     * @mbggenerated
     */
    private Long amount;

    /**
     * APP处理消息
     *
     * @mbggenerated
     */
    private String appMsg;

    private static final long serialVersionUID = 1L;

    public String getPayOrderId() {
        return payOrderId;
    }

    public void setPayOrderId(String payOrderId) {
        this.payOrderId = payOrderId;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getOutUserId() {
        return outUserId;
    }

    public void setOutUserId(String outUserId) {
        this.outUserId = outUserId;
    }

    public String getInUserId() {
        return inUserId;
    }

    public void setInUserId(String inUserId) {
        this.inUserId = inUserId;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Date getAppHeartTime() {
        return appHeartTime;
    }

    public void setAppHeartTime(Date appHeartTime) {
        this.appHeartTime = appHeartTime;
    }

    public Date getSyncTime() {
        return syncTime;
    }

    public void setSyncTime(Date syncTime) {
        this.syncTime = syncTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getAlipayAccount() {
        return alipayAccount;
    }

    public void setAlipayAccount(String alipayAccount) {
        this.alipayAccount = alipayAccount;
    }

    public Long getAmount() {
        return amount;
    }

    public void setAmount(Long amount) {
        this.amount = amount;
    }

    public String getAppMsg() {
        return appMsg;
    }

    public void setAppMsg(String appMsg) {
        this.appMsg = appMsg;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", payOrderId=").append(payOrderId);
        sb.append(", tradeNo=").append(tradeNo);
        sb.append(", outUserId=").append(outUserId);
        sb.append(", inUserId=").append(inUserId);
        sb.append(", status=").append(status);
        sb.append(", appHeartTime=").append(appHeartTime);
        sb.append(", syncTime=").append(syncTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", alipayAccount=").append(alipayAccount);
        sb.append(", amount=").append(amount);
        sb.append(", appMsg=").append(appMsg);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AlipayPayOrder other = (AlipayPayOrder) that;
        return (this.getPayOrderId() == null ? other.getPayOrderId() == null : this.getPayOrderId().equals(other.getPayOrderId()))
            && (this.getTradeNo() == null ? other.getTradeNo() == null : this.getTradeNo().equals(other.getTradeNo()))
            && (this.getOutUserId() == null ? other.getOutUserId() == null : this.getOutUserId().equals(other.getOutUserId()))
            && (this.getInUserId() == null ? other.getInUserId() == null : this.getInUserId().equals(other.getInUserId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getAppHeartTime() == null ? other.getAppHeartTime() == null : this.getAppHeartTime().equals(other.getAppHeartTime()))
            && (this.getSyncTime() == null ? other.getSyncTime() == null : this.getSyncTime().equals(other.getSyncTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getAlipayAccount() == null ? other.getAlipayAccount() == null : this.getAlipayAccount().equals(other.getAlipayAccount()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getAppMsg() == null ? other.getAppMsg() == null : this.getAppMsg().equals(other.getAppMsg()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPayOrderId() == null) ? 0 : getPayOrderId().hashCode());
        result = prime * result + ((getTradeNo() == null) ? 0 : getTradeNo().hashCode());
        result = prime * result + ((getOutUserId() == null) ? 0 : getOutUserId().hashCode());
        result = prime * result + ((getInUserId() == null) ? 0 : getInUserId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getAppHeartTime() == null) ? 0 : getAppHeartTime().hashCode());
        result = prime * result + ((getSyncTime() == null) ? 0 : getSyncTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getAlipayAccount() == null) ? 0 : getAlipayAccount().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getAppMsg() == null) ? 0 : getAppMsg().hashCode());
        return result;
    }
}